﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ProjetoSolo.QueroGas.Aplicacao.ServicosExternos;

namespace ProjetoSolo.QueroGas.Infraestrutura.ServicosWeb
{
    public class ServicoGeracaoSenha : IServicoGeracaoSenha
    {
        public string GerarSenha()
        {
            Random random = new Random();
            StringBuilder senha = new StringBuilder();

            for (int i = 0; i < 4; i++)
            {
                senha.Append(Convert.ToChar(Convert.ToInt32(Math.Floor(26 * random.NextDouble() + 65))));
                senha.Append(random.Next(10));
            }

            return senha.ToString();
        }
    }
}
